package com.vmont.encodeapp.adapter;

import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.vmont.encodeapp.R;
import com.vmont.encodeapp.bean.AlarmBean;
import com.vmont.encodeapp.bean.DevBean;

import java.util.List;

public class AlarmAdapter extends BaseQuickAdapter<AlarmBean, BaseViewHolder> {
    public AlarmAdapter(int layoutResId, @Nullable List<AlarmBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, AlarmBean item) {
        if (helper.getAdapterPosition() % 2 == 0) {
            helper.setBackgroundRes(R.id.ll_bg, R.color.F7F8FB);
        } else {
            helper.setBackgroundRes(R.id.ll_bg, R.color.white);
        }
    }
}
